package xujoe.SSMDemo.service;

import org.springframework.beans.factory.annotation.Autowired;
import xujoe.SSMDemo.pojo.Admin;
import xujoe.SSMDemo.dao.AdminMapper;
import xujoe.SSMDemo.pojo.Admin;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;


@Service("AdminService")
public class AdminService {
    @Resource
    private AdminMapper adminMapper;


    public boolean Login(String user, String password) {
        Map<String,String> loginMap = new HashMap<String, String>();
        loginMap.put("user",user);
        loginMap.put("password",password);

        int m = this.adminMapper.Login(loginMap);
        if (m == 1) {
            return true;
        } else {
            return false;
        }
    }


    public int getCheck(int id) {
        return 0;
    }


}